
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Tathata.Common.BLL.Entities;
using Tathata.Common.BLL.Managers;

namespace Tathata.Web.Administration
{
    public partial class Administration_Default : BaseNopAdministrationPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                try
                {
                    StringBuilder warningResult = new StringBuilder();
                    if (CurrencyManager.PrimaryExchangeRateCurrency == null)
                    {
                        warningResult.Append("Primary exchange rate currency is not set. <a href=\"Currencies.aspx\">Set now</a>");
                        warningResult.Append("<br />");
                    }

                    if (CurrencyManager.PrimaryStoreCurrency == null)
                    {
                        warningResult.Append("Primary store currency is not set. <a href=\"Currencies.aspx\">Set now</a>");
                        warningResult.Append("<br />");
                    }

                    if (MeasureWeightManager.BaseWeightIn == null)
                    {
                        warningResult.Append("The weight that will can used as a default is not set. <a href=\"CommonSettings.aspx\">Set now</a>");
                        warningResult.Append("<br />");
                    }

                    if (MeasureDimensionManager.BaseDimensionIn == null)
                    {
                        warningResult.Append("The dimension that will can used as a default is not set. <a href=\"CommonSettings.aspx\">Set now</a>");
                        warningResult.Append("<br />");
                    }

                    lblWarnings.Text = warningResult.ToString();

                  
                }
                catch (Exception exc)
                {
                    ProcessException(exc);
                }
            }
        }
    }
}
